window.onload=function (){
    //获取显示隐藏按钮的dom对象
    let showButton=document.getElementById('showButton');
    //获取订单明细dom对象
    let detailedBox=document.getElementById('detailedBox');

    detailedBox.style.display ='none';//设置默认订单明细为隐藏

    showButton.onclick=function (){
        //判断订单明细是否隐藏或显示。是则显示，否则隐藏
        if(detailedBox.style.display === "none"){//恒等号会先判断是否有类型不对的情况，避免强制类型转换
            detailedBox.style.display ='block';
        }else{
            detailedBox.style.display ='none';
        }
    }
}
